package top.moxingwang.javawork.bytecode;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

public class DynamicDispatch {
    static abstract class Human{
        protected abstract void sayHello();
    }

    static class Man extends Human {

        @Override
        protected void sayHello() {
            System.out.println("man say");
        }
    }
    static class Woman extends Human {

        @Override
        protected void sayHello() {
            System.out.println("woman say");
        }
    }

    public String stringDy(Object a ,Object b,Object c) {

            return "a" + a + "b" + b;
    }

    public void streamTest() {
        List list = Arrays.asList();
        list.stream().filter(p -> p.toString().equals("T")).collect(Collectors.toList());

    }
    public static void main(String[] args) {
        Human man = new Man();
        Human woman = new Woman();
        man.sayHello();
        woman.sayHello();

        man = new Woman();
        man.sayHello();
    }
}
